#include <bits/stdc++.h>
using namespace std;

class Solution
{
public:
    int main()
    {
        int n;
        cin >> n;
        vector<vector<int>> mat(n, vector<int>(n, 0));
        int torchCount, glowstoneCount;
        cin >> torchCount >> glowstoneCount;
        for (int i = 0; i < torchCount; ++i)
        {
            int x, y;
            cin >> x >> y;
            placeTorch(mat, x - 1, y - 1, n, n);
        }
        for (int i = 0; i < glowstoneCount; ++i)
        {
            int x, y;
            cin >> x >> y;
            placeGlowstone(mat, x - 1, y - 1, n, n);
        }
        int darkCount = n * n;
        for (auto &row : mat)
        {
            for (int point : row)
            {
                darkCount -= point;
            }
        }
        cout << darkCount;
        return 0;
    }

    void placeTorch(vector<vector<int>> &mat, int x, int y, int m, int n)
    {
        if (x - 2 >= 0)
        {
            mat[x - 2][y] = 1;
        }
        if (x + 2 < m)
        {
            mat[x + 2][y] = 1;
        }
        if (y - 2 >= 0)
        {
            mat[x][y - 2] = 1;
        }
        if (y + 2 < n)
        {
            mat[x][y + 2] = 1;
        }
        for (int i = max(0, x - 1); i <= min(m - 1, x + 1); ++i)
        {
            for (int j = max(0, y - 1); j <= min(n - 1, y + 1); ++j)
            {
                mat[i][j] = 1;
            }
        }
    }

    void placeGlowstone(vector<vector<int>> &mat, int x, int y, int m, int n)
    {
        for (int i = max(0, x - 2); i <= min(m - 1, x + 2); ++i)
        {
            for (int j = max(0, y - 2); j <= min(n - 1, y + 2); ++j)
            {
                mat[i][j] = 1;
            }
        }
    }
};

#ifndef __LOCAL_TEST__
int main()
{
    return Solution().main();
}
#endif